Optimal. Leaf size=173 \[ \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}+\frac {b n \text {Li}_2\left (-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2404, 2354,
2438} \begin {gather*} \frac {b n \text {PolyLog}\left (2,-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {PolyLog}\left (2,-\frac {2 f x}{\sqrt {e^2-4 d f}+e}\right )}{\sqrt {e^2-4 d f}}+\frac {\log \left (\frac {2 f x}{e-\sqrt {e^2-4 d f}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (\frac {2 f x}{\sqrt {e^2-4 d f}+e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2354
Rule 2404
Rule 2438
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{d+e x+f x^2} \, dx &=\int \left (\frac {2 f \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f} \left (e-\sqrt {e^2-4 d f}+2 f x\right )}-\frac {2 f \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e^2-4 d f} \left (e+\sqrt {e^2-4 d f}+2 f x\right )}\right ) \, dx\\ &=\frac {(2 f) \int \frac {a+b \log \left (c x^n\right )}{e-\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}-\frac {(2 f) \int \frac {a+b \log \left (c x^n\right )}{e+\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {(b n) \int \frac {\log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{x} \, dx}{\sqrt {e^2-4 d f}}+\frac {(b n) \int \frac {\log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}+\frac {b n \text {Li}_2\left (-\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}-\frac {b n \text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )}{\sqrt {e^2-4 d f}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 173, normalized size = 1.00 \begin {gather*} \frac {2 \tan ^{-1}\left (\frac {e+2 f x}{\sqrt {-e^2+4 d f}}\right ) \left (a-b n \log (x)+b \log \left (c x^n\right )\right )}{\sqrt {-e^2+4 d f}}+\frac {b n \left (\log (x) \left (\log \left (1+\frac {2 f x}{e-\sqrt {e^2-4 d f}}\right )-\log \left (1+\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )\right )+\text {Li}_2\left (\frac {2 f x}{-e+\sqrt {e^2-4 d f}}\right )-\text {Li}_2\left (-\frac {2 f x}{e+\sqrt {e^2-4 d f}}\right )\right )}{\sqrt {e^2-4 d f}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.24, size = 555, normalized size = 3.21
method | result | size |
risch | \(-\frac {2 b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) n \ln \left (x \right )}{\sqrt {4 d f -e^{2}}}+\frac {2 b \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \left (x^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {b n \ln \left (x \right ) \ln \left (\frac {-2 f x +\sqrt {-4 d f +e^{2}}-e}{-e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {2 f x +\sqrt {-4 d f +e^{2}}+e}{e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}+\frac {b n \dilog \left (\frac {-2 f x +\sqrt {-4 d f +e^{2}}-e}{-e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}-\frac {b n \dilog \left (\frac {2 f x +\sqrt {-4 d f +e^{2}}+e}{e +\sqrt {-4 d f +e^{2}}}\right )}{\sqrt {-4 d f +e^{2}}}-\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}+\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}-\frac {i \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{\sqrt {4 d f -e^{2}}}+\frac {2 \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) b \ln \left (c \right )}{\sqrt {4 d f -e^{2}}}+\frac {2 a \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right )}{\sqrt {4 d f -e^{2}}}\) | \(555\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{d + e x + f x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{f\,x^2+e\,x+d} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________